import 'package:flutter/material.dart';

/// 类似阅读页详情上标签效果
class CircleTag extends StatelessWidget {
  final Color bgColor;
  final Color textColor;
  final String text;
  final EdgeInsets padding;
  final EdgeInsets margin;
  final BorderRadiusGeometry borderRadius;
  final double fontSize;

  CircleTag(
      {Key key,
      this.bgColor,
      this.text,
      this.textColor,
      this.margin = const EdgeInsets.only(right: 8),
      this.padding =
          const EdgeInsets.only(top: 2, right: 5, bottom: 2, left: 5),
      this.borderRadius = const BorderRadius.all(Radius.circular(5)),
      this.fontSize = 10})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
        margin: margin,
        padding: padding,
        decoration: BoxDecoration(borderRadius: borderRadius, color: bgColor),
        child: Text(
          text,
          style: TextStyle(fontSize: fontSize, color: textColor),
        ));
  }
}
